<?php
namespace Home\Controller;
use Think\Controller;
class ShopController extends CommonController {
	public function introduction(){
		$shop_id = I ('get.shop_id');
		$Shop = M ("Shop");
		$res = $Shop->where("shop_id={$shop_id}")->find();	
		$picture = $res['picture'];
		$var = json_decode($picture);
		$data = array();
		$dataa = array();
		foreach($var as $val){
			//将json数据转换为数组
			$photomid=str_replace('//','/mid_',$val);
			$photomin=str_replace('//','/min_',$val);
			//$val['big'] = $var[0];
			$dataa = array(
				$val,$photomid,$photomin
			);
			$data[] = $dataa;
		}
		$this->assign('data',$data);
		$this->display('introduction'); 
	}
	public function shopcart(){
		$this->display('shopcart');
		
	}
	
}
